package com.example.tiaozhuang;

import android.content.Intent;
import android.content.SharedPreferences;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

public class Main3Activity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main3);

        SharedPreferences sharedPreferences=getSharedPreferences("sp",MODE_APPEND);
        boolean flag=sharedPreferences.getBoolean("f",false);
        if (flag){
            startActivity(new Intent(this,Main2Activity.class));
        }else {
            startActivity(new Intent(this,Main2Activity.class));
        }
        finish();
    }

}

